#include"matrix_Product.h"
int main()
{
    int n = 0;
    cout << "请输入矩阵的边长:";
    cin >> n;
    srand((unsigned int)NULL);
    vector<vector<int>> A(n, vector<int>(n, 0));
    vector<vector<int>> B(n, vector<int>(n, 0));
    // 随机赋值
    Assignment(A);
    cout << "A矩阵的值:" << endl;
    for (auto e : A)
    {
        for (int i = 0; i < n; i++)
        {
            cout << e[i] << " ";
        }
        cout << '\n';
    }
    cout << endl;
    Assignment(B);
    cout << "B矩阵的值:" << endl;
    for (auto e : A)
    {
        for (int i = 0; i < n; i++)
        {
            cout << e[i] << " ";
        }
        cout << '\n';
    }
    cout << endl;
    // 求A和B的相乘结果
    vector<vector<int>> C(n, vector<int>(n, 0));
    Result_of_matrix(A, B, C);
    cout << "C结果为:" << endl;
    // 打印结果
    for (auto e : C)
    {
        for (int i = 0; i < n; i++)
        {
            cout << e[i] << " ";
        }
        cout << '\n';
    }
    return 0;
}